Skip to content

Find where a model fails and fix it ​

A first model is rarely perfect, and its mistakes say what to do next. Some come from a wrong label in the dataset: the model was right and the label was not. Others are the model's own, and it needs more examples. This guide opens the test images a model got wrong, tells the two cases apart, corrects a label and prepares the dataset for the next training.

What you will learn

  • How to list the images a model got wrong
  • How to tell a wrong label from a wrong prediction
  • How to correct a label from the results
  • What to change before training again

Before you start

You need a model with a finished training. Its scores are explained in Read the results of a classification model.

1. Open the results ​

Open the dataset, go to «Models» and click the model. This first model of glass jars scores 75 %: of the four test images, one is wrong.

Open the results

2. Look at every evaluation image ​

With few images, every one counts: choose «All» in the selector of the scores to include the validation images, which the model did not learn from either.

3. Show only the mistakes ​

Click «Evaluation images» and set the «Prediction» filter to «Incorrect». Only the images the model got wrong remain, each with the class it predicted and its confidence. Here, two jars that should be ok were called broken.

Show only the mistakes

4. Look at the first one ​

Click an image to open it. jar_105 is a good jar, labeled «ok», and the model calls it broken with 68 %. The label is right: the model has not seen enough good jars like this one yet. Mistakes like this one are fixed with more examples, not by changing labels.

Look at the first one

5. Look at the second one ​

Click «Next». jar_116 is labeled «ok», but its rim is chipped: the model, which calls it broken, is right. A wrong label teaches the model the wrong thing and lowers its score: correct it.

Look at the second one

6. Find it in the labeling grid ​

Note the name of the image, at the top of the viewer, and close it. Click «Labeling» and type the name, here jar_116, in the search box of the image grid.

Find it in the labeling grid

7. Open it ​

Click the image to open it in the labeling editor. The «Labels» panel, on the right, shows its tag: «ok».

8. Correct the label ​

In the «Labels» panel, click the tag the image deserves, here «broken». It is saved at once. The results of the model do not change: they keep the labels it was tested with. The correction counts from the next training.

Correct the label

Before training again ​

  • Wrong labels. Correct every one you find. If there are many, go through the whole tag in the labeling grid, not only the test images: the training images may have the same problem.
  • Mistakes of the model. Upload more images like the ones it gets wrong and label them; a class with few images, or very different images, learns little. A longer training or a larger model can help when the curve of «Training details» was still climbing.
  • Then train a new model and compare its scores with this one: Retrain a model after adding images keeps the settings of this training.

Next steps ​

Recorded on Rosepetal release 1.8.15.